package com.erpanderp.wam.asset.view;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.swing.SwingWorker;

import org.primefaces.component.datatable.DataTable;
import org.primefaces.context.RequestContext;

import com.erpanderp.wam.adm.model.entity.CustomLookup;
import com.erpanderp.wam.adm.model.entity.LookupValue;
import com.erpanderp.wam.adm.model.service.CustomLookupDAO;
import com.erpanderp.wam.asset.model.entity.AssetDetails;
import com.erpanderp.wam.asset.model.entity.AssetRequest;
import com.erpanderp.wam.asset.model.entity.SystemAssets;
import com.erpanderp.wam.asset.model.service.AssetRequestDAO;
import com.erpanderp.wam.usm.model.entity.user.Employee;
import com.erpanderp.wam.usm.model.entity.user.WAMUser;
import com.erpanderp.wam.usm.model.service.user.EmployeeAndReportingDAO;
import com.erpanderp.wam.usm.model.service.user.EmployeeDAO;
import com.erpanderp.wam.util.CommonLookup;
import com.erpanderp.wam.util.EmailUtil;
import com.erpanderp.wam.util.ValidationUtil;
import com.erpanderp.wam.util.WAMHostManager;


@ManagedBean
@ViewScoped
public class RaiseAssetRequestBean implements Serializable{

	private static final long serialVersionUID = 1L;
	HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true);
	ServletContext context = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();
	private WAMUser wamUser = (WAMUser) session.getAttribute(CommonLookup.SESSION_ATTRIBUTE_WAMUSER);
	private TimeZone timeZone = TimeZone.getDefault();
	private Map<String,String> assetPurposeMap = CommonLookup.getAssetPupose();
	
	private AssetRequestDAO assetRequestDAO =new AssetRequestDAO();
	private EmployeeDAO employeeDAO = new EmployeeDAO();
	private EmployeeAndReportingDAO employeeAndReportingDAO = new EmployeeAndReportingDAO();
	private CustomLookupDAO customLookupDAO = new CustomLookupDAO();
	
	private AssetRequest assetRequest =new AssetRequest();
	private AssetRequest viewAssetRequest;
	private AssetRequest editAssetRequest;
	private SystemAssets systemAssets=new SystemAssets();
	private AssetDetails assetDetails=new AssetDetails();
	private AssetDetails editAssetDetails=new AssetDetails();
	private CustomLookup customLookUp = new CustomLookup();
	
	private Map<String, String> assetsMap = new HashMap<String, String>();
	private List<LookupValue> systemAssetsList = new ArrayList<LookupValue>();
	private List<AssetDetails> assetDetailsList = new ArrayList<AssetDetails>(); 
	private List<AssetRequest> viewAssetRequestList = new ArrayList<AssetRequest>(); 
	private List<AssetDetails> viewAssetDetailsList = new ArrayList<AssetDetails>(); 
	private List<AssetDetails> editAssetDetailsList;
	
	private String assetCode ;
	private Employee employeeVP;
	private boolean ASSET_VALID;
	private boolean FORM_VALID;
	private DataTable assetDetailsTable;
	private DataTable assetDetailsEditTable;
	private EmailUtil emailUtil;
	private String EMAIL_MESSAGE;
	private String toDay;
	private Date date;	
	private int viewSno=1;

	public RaiseAssetRequestBean() {
		
		try {
			Calendar currentDate = Calendar.getInstance();
			SimpleDateFormat formate= new SimpleDateFormat("dd-MMM-yyyy hh:mm:ss");
			toDay = formate.format(currentDate.getTime());
				
			date = (Date)formate.parse(toDay);
			employeeVP=employeeDAO.getVP();
			
			/*systemAssetsList = assetRequestDAO.getAllAssets();
			for (SystemAssets systemAssets : systemAssetsList) {
				assetsMap.put(systemAssets.getAssetName(), systemAssets.getAssetName());
			}*/
			
			customLookUp = customLookupDAO.getCustomLookUp(CommonLookup.ASSETTYPE_CUSTOM_LOOKUP);
			systemAssetsList = customLookupDAO.getLookupValuesList(customLookUp.getCustomLookId());
			for(LookupValue lookUpValue : systemAssetsList){
				assetsMap.put(lookUpValue.getLookupName(), lookUpValue.getLookupValue());
			}
			viewAssetRequestList = assetRequestDAO.getAllAssetRequestsByEmployeeId(wamUser.getEmployee().getEmployeeId());
			for(AssetRequest ar:viewAssetRequestList){
				ar.setSno(viewSno);
				viewSno++;
			}
			
			assetCode=CommonLookup.getAutoGeneratedAssetCode();
			assetRequest.setAssetReferenceCode(assetCode);
			assetRequest.setRequestDate(date);
			assetRequest.setApprovedBy(employeeVP);
			//travelRequest.setApprover(employeeAndReportingDAO.getEmployeeReportingDetail(wamUser.getEmployee().getEmployeeId()).getProjectManager());
			assetRequest.setRecommendedBy(employeeAndReportingDAO.getEmployeeReportingDetail(wamUser.getEmployee().getEmployeeId()).getProjectManager());
			
		} catch (ParseException e) {
			e.printStackTrace();
		}  
	}
	
	//Add Asset Details List or Table
	public void addAssetDetailsAction() {
		assetValidateForm();
		if(ASSET_VALID) {
			try{
				assetDetails.setAssetReferenceCode(assetCode);
				assetDetails.setAssetRequest(assetRequest);
				assetDetails.setAssetAssignedStatus(CommonLookup.ASSET_NOTASSIGNED_STATUS);
				assetDetails.setAssetRaisedBy(wamUser.getEmployee());
				assetDetails.setCreateDate(new Date());
				assetDetails.setCreatedBy(wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName());
				assetDetails.setStatus(CommonLookup.STATUS_ACTIVE);
				assetDetailsList.add(assetDetails); //ALL RECORDS LIST
				assetDetails = new AssetDetails();				
			}catch (Exception e) {
				e.printStackTrace();
			}
		}
	}	
	
	//Add Edited Asset Details List or Table
		public void addEditedAssetDetailsAction() {
			assetEditValidateForm();
			if(ASSET_VALID) {
				try{
					editAssetDetails.setAssetReferenceCode(editAssetRequest.getAssetReferenceCode());
					editAssetDetails.setAssetRequest(editAssetRequest);
					editAssetDetails.setAssetAssignedStatus(CommonLookup.ASSET_NOTASSIGNED_STATUS);
					editAssetDetails.setAssetRaisedBy(wamUser.getEmployee());
					editAssetDetails.setDateModified(new Date());
					editAssetDetails.setModifiedBy(wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName());
					editAssetDetails.setStatus(CommonLookup.STATUS_ACTIVE);
					editAssetDetailsList.add(editAssetDetails); //ALL RECORDS LIST
					editAssetRequest.getAssetDetails().add(editAssetDetails);
					editAssetDetails = new AssetDetails();	
					RequestContext.getCurrentInstance().execute("assetEditDialog.show();");
				}catch (Exception e) {
					e.printStackTrace();
				}
			}else{
				RequestContext.getCurrentInstance().execute("assetEditDialog.show();");
			}
		}	

	 //View/Print ASSET Request 
	 public String viewOrPrintAssetRequestAction() {		 
		 try{			
			  Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
			  String assetCode = params.get("assetCode");
			  FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("assetCode", assetCode);
			  FacesContext.getCurrentInstance().getExternalContext().redirect("/wam/asset/printassetrequest.html?assetCode="+assetCode);
			
			}catch(Exception e){
	    	   e.printStackTrace();
		   }
		 return "printassetrequest";	 
	}
	 
	 //EDIT ASSET REQUEST 
	 public String editAssetRequestAction() {		 
		 try{			
			  Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
			  String assetCode = params.get("editAssetCode");
			  editAssetRequest = assetRequestDAO.getAssetRequestByAssetCode(assetCode);
			  editAssetRequest.setRequestDate(new Date());
			  
			  editAssetDetailsList =assetRequestDAO.getAllAssetDetailsByAssetCode(editAssetRequest.getAssetRequestId());
			  RequestContext.getCurrentInstance().execute("assetEditDialog.show();");
			}catch(Exception e){
	    	   e.printStackTrace();
		   }
		 return null;	 
	}
	
	//DELETE RECORDS FROM LIST(s)	
	public void removeAssetDetailsAction(ActionEvent ae){		
		AssetDetails selectedAsset = (AssetDetails) assetDetailsTable.getRowData();				
		assetDetailsList.remove(selectedAsset);		
	}
	public void removeEditedAssetDetailsAction(ActionEvent ae){		
		AssetDetails selectedAsset = (AssetDetails) assetDetailsEditTable.getRowData();				
		editAssetDetailsList.remove(selectedAsset);		
		assetRequestDAO.deleteAssetDetailsById(selectedAsset);
		RequestContext.getCurrentInstance().execute("assetEditDialog.show();");
	}
	
	//SAVE TRAVEL EXPENSE
	public String saveAssetRequestAction(){	
	validateForm();	
		if(FORM_VALID){				
			assetRequest.setEmployee(wamUser.getEmployee());
			assetRequest.setModuleName(wamUser.getEmployee().getModuleName());
			assetRequest.setAssetStatus("IN USE");//not required
			assetRequest.setRecommenderStatus(CommonLookup.STATUS_INPROCESS);
			assetRequest.setApproverStatus(CommonLookup.STATUS_INPROCESS);
			assetRequest.setRecommenderComments("");
			assetRequest.setApproverComments("");
			assetRequest.setCreateDate(new Date());
			assetRequest.setCreatedBy(wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName());
			assetRequest.setStatus(CommonLookup.STATUS_ACTIVE);
			assetRequest.getAssetDetails().addAll(assetDetailsList);				
			 
			 assetRequestDAO.saveOrUpdateAssetRequest(assetRequest);
			 FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,  " You have submitted successfully.", ""));
			 assetDetailsList.clear(); 
			//MAIL TRIGGERING CODE
			System.out.println("AT CALLER METHOD: " + sendMessage());  //*******DONT REMOVE*******
			return "raiseassetrequest";
		}else{
			System.out.println("AT CALLER METHOD: FORM IN VALID");  
			return null;
		}		
	}
	
	
	public String saveEditedAssetRequestAction(){	
		editValidateForm();	
			if(FORM_VALID){	
					
				for(AssetDetails as : editAssetDetailsList){
 					as.setAssetRequest(editAssetRequest);
				}				
				editAssetRequest.setEmployee(wamUser.getEmployee());
				editAssetRequest.setModuleName(wamUser.getEmployee().getModuleName());
				editAssetRequest.setRecommenderStatus(CommonLookup.STATUS_INPROCESS);
				editAssetRequest.setApproverStatus(CommonLookup.STATUS_INPROCESS);
				editAssetRequest.setRecommenderComments("");
				editAssetRequest.setApproverComments("");
				editAssetRequest.setDateModified(new Date());
				editAssetRequest.setModifiedBy(wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName());
				editAssetRequest.setStatus(CommonLookup.STATUS_ACTIVE);
			 				
				if(assetRequestDAO.saveOrUpdateAssetRequest(editAssetRequest) != null){
					 FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,  " You have updated successfully.", ""));
					 //MAIL TRIGGERING CODE
					 System.out.println("AT CALLER METHOD: " + editSendMessage());  //*******DONT REMOVE*******
				 }else{
					 FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN,  "Failed to update Asset Request.", ""));
				 }
				return "raiseassetrequest";
			}else{
				System.out.println("AT CALLER METHOD: FORM IN VALID");  
				return null;
			}		
		}
	public void confirmationAction(ActionEvent e){
		validateForm();	
		if(FORM_VALID){	
			RequestContext.getCurrentInstance().execute("confirmation.show();");
		}else {
			RequestContext.getCurrentInstance().execute("confirmation.hide();");
		}
    }
	public void editConfirmationAction(ActionEvent e){
		editValidateForm();	
		if(FORM_VALID){	
			RequestContext.getCurrentInstance().execute("editConfirmation.show();");
		}else {
			RequestContext.getCurrentInstance().execute("editConfirmation.hide();");
		}
    }	
	
	//SENDING EMAIL 
	public String sendMessage(){
		Map<String, String> hostsMap = WAMHostManager.getWAMHosts(context);
		String domainName = context.getInitParameter("domainName");
		String messageString ="";	
		
		SimpleDateFormat formate = new SimpleDateFormat("dd-MMM-yyyy");
		String requestDate = formate.format(assetRequest.getRequestDate());
	
		emailUtil = new EmailUtil();
		if (hostsMap.get(CommonLookup.DEV_EMAIL) == null) {
			String[] to = { assetRequest.getRecommendedBy().getEmail() };
			emailUtil.setRecieverAddresses(to);
		} else {
			String[] to = { hostsMap.get(CommonLookup.DEV_EMAIL) };
			System.out.println(to);
			emailUtil.setRecieverAddresses(to);
		}
						
		String requestURL = "asset/approveassetrequest.html?assetCode=" + assetCode+"&activity=byRecommender" ;
		String privateLink = "http://" + hostsMap.get(CommonLookup.PRIVATEHOST) + "/" + domainName + "/" + requestURL;
		String publicLink = "http://" + hostsMap.get(CommonLookup.PUBLICHOST) + "/"	+ domainName + "/" + requestURL;
		
		messageString = "Dear " + assetRequest.getRecommendedBy().getFirstName() + " " + assetRequest.getRecommendedBy().getLastName() + "" +
					    ",<br /><br />" +
					    "<b>New asset request raised by </b>" +
						"<table style='border: 1px solid #d9d9d9;'>" +
				        "<tr> <td>Employee Name</td><td> : </td><td>" + wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName()+"</td></tr>" +
				        "<tr> <td>Employee Code</td><td> : </td><td>" + wamUser.getEmployee().getEmployeeCode()+"</td></tr>" +
				        "<tr> <td>Request Date</td><td> : </td><td>" + requestDate+ " </td></tr>" +
				        "<tr> <td>Asset Request Code</td><td> : </td><td>" + assetRequest.getAssetReferenceCode()+ " </td></tr>" +					        						       
				        "</table><br/>"+	
					        
					        "<a style='color:#FF9933;font-weight: bold;' href=\""+
					        privateLink + "\">" + "Please click here to Recommend/Reject asset request" + "</a /><br />"+
							"(Employees who are in Hyderabad office)"+"<br /><br />"+
							"<a style='color:#FF9933;font-weight: bold;' href=\""+
							publicLink + "\">" + "Please click here to Recommend/Reject asset request" + "</a /><br />"+
							"(out side Hyderabad office)"+"<br /><br />"+
							
							"Thanks & Regards, <br />"+CommonLookup.WAM_DEVTEAM_SIGNATURE;
				
				emailUtil.setMessage(messageString);
				emailUtil.setSenderEmail("podquick@erpanderp.com", "WAM - Dev Team");
				emailUtil.setSubject(wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName() +"( "+assetRequest.getAssetReferenceCode()+" ) - Asset Request");
				
				SwingWorker worker = new SwingWorker<String, Object>() {
					@Override
					protected String doInBackground() throws Exception {
						EMAIL_MESSAGE = emailUtil.processAndSendEmail();
						return null;
					}

					@Override
					protected void done() {
							System.out.println("DONE " + EMAIL_MESSAGE);		
					}
				};
				worker.execute();
				System.out.println( "BEFORE RETURNING: " + EMAIL_MESSAGE);
				return EMAIL_MESSAGE;
	 }
	
	//SENDING EMAIL 
		public String editSendMessage(){
			Map<String, String> hostsMap = WAMHostManager.getWAMHosts(context);
			String domainName = context.getInitParameter("domainName");
			String messageString ="";	
			
			SimpleDateFormat formate = new SimpleDateFormat("dd-MMM-yyyy");
			String requestDate = formate.format(editAssetRequest.getRequestDate());
			emailUtil = new EmailUtil();
			if (hostsMap.get(CommonLookup.DEV_EMAIL) == null) {
				String[] to = { editAssetRequest.getRecommendedBy().getEmail() };
				emailUtil.setRecieverAddresses(to);
			} else {
				String[] to = { hostsMap.get(CommonLookup.DEV_EMAIL) };
				System.out.println(to);
				emailUtil.setRecieverAddresses(to);
			}
							
			String requestURL = "asset/approveassetrequest.html?assetCode=" + editAssetRequest.getAssetReferenceCode()+"&activity=byRecommender" ;
			String privateLink = "http://" + hostsMap.get(CommonLookup.PRIVATEHOST) + "/" + domainName + "/" + requestURL;
			String publicLink = "http://" + hostsMap.get(CommonLookup.PUBLICHOST) + "/"	+ domainName + "/" + requestURL;
			
			messageString = "Dear " + editAssetRequest.getRecommendedBy().getFirstName() + " " + editAssetRequest.getRecommendedBy().getLastName() + "" +
						    ",<br /><br />" +
						    "<b>New asset request raised by </b>" +
							"<table style='border: 1px solid #d9d9d9;'>" +
					        "<tr> <td>Employee Name</td><td> : </td><td>" + wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName()+"</td></tr>" +
					        "<tr> <td>Employee Code</td><td> : </td><td>" + wamUser.getEmployee().getEmployeeCode()+"</td></tr>" +
					        "<tr> <td>Request Date</td><td> : </td><td>" + requestDate+ " </td></tr>" +
					        "<tr> <td>Asset Request Code</td><td> : </td><td>" + editAssetRequest.getAssetReferenceCode()+ " </td></tr>" +					        						       
					        "</table><br/>"+	
						        
						        "<a style='color:#FF9933;font-weight: bold;' href=\""+
						        privateLink + "\">" + "Please click here to Recommend/Reject asset request" + "</a /><br />"+
								"(Employees who are in Hyderabad office)"+"<br /><br />"+
								"<a style='color:#FF9933;font-weight: bold;' href=\""+
								publicLink + "\">" + "Please click here to Recommend/Reject asset request" + "</a /><br />"+
								"(out side Hyderabad office)"+"<br /><br />"+
								
								"Thanks & Regards, <br />"+CommonLookup.WAM_DEVTEAM_SIGNATURE;
					
					emailUtil.setMessage(messageString);
					emailUtil.setSenderEmail("podquick@erpanderp.com", "WAM - Dev Team");
					emailUtil.setSubject(wamUser.getEmployee().getFirstName()+" "+wamUser.getEmployee().getLastName() +"( "+editAssetRequest.getAssetReferenceCode()+" ) - Asset Request");
					
					SwingWorker worker = new SwingWorker<String, Object>() {
						@Override
						protected String doInBackground() throws Exception {
							EMAIL_MESSAGE = emailUtil.processAndSendEmail();
							return null;
						}

						@Override
						protected void done() {
								System.out.println("DONE " + EMAIL_MESSAGE);		
						}
					};
					worker.execute();
					System.out.println( "BEFORE RETURNING: " + EMAIL_MESSAGE);
					return EMAIL_MESSAGE;
		 }
	//Final validation 
		private void validateForm(){
			FORM_VALID=true;		
			if (assetDetailsList.size() == 0) {
				FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"There are no records to submit the form.", ""));
				FORM_VALID = false;
			}			
		}
		private void editValidateForm(){
			FORM_VALID=true;		
			if (editAssetDetailsList.size() == 0) {
				FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"There are no records to submit the form.", ""));
				FORM_VALID = false;
			}			
		}
		
		// VALIDATIONS
		private void assetValidateForm(){
			ASSET_VALID=true;		
			if(ValidationUtil.isEmpty((assetDetails.getRequiredDate()!=null) ? assetDetails.getRequiredDate().toString():null, "Required On", null,
					FacesContext.getCurrentInstance()) != null) {
				ASSET_VALID = false;
			}
			if(ValidationUtil.isEmpty((assetDetails.getExpectedReturnDate()!=null) ? assetDetails.getExpectedReturnDate().toString():null, "Expected Return Date", null,
					FacesContext.getCurrentInstance()) != null) {
				ASSET_VALID = false;
			}
			if((assetDetails.getRequiredDate()!=null) && (assetDetails.getExpectedReturnDate()!=null)){
				if(assetDetails.getRequiredDate().after(assetDetails.getExpectedReturnDate())) {
					ASSET_VALID = false;
					FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Required On date should be less than the return date.", ""));
				}
				if(date.after(assetDetails.getRequiredDate())) {
					ASSET_VALID = false;
					FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Required On date should be grater than the request date.", ""));
				}
			}
		  
		}
		// VALIDATIONS
	private void assetEditValidateForm(){
		ASSET_VALID=true;		
		if(ValidationUtil.isEmpty((editAssetDetails.getRequiredDate()!=null) ? editAssetDetails.getRequiredDate().toString():null, "Required On", null,
				FacesContext.getCurrentInstance()) != null) {
			ASSET_VALID = false;
		}
		if(ValidationUtil.isEmpty((editAssetDetails.getExpectedReturnDate()!=null) ? editAssetDetails.getExpectedReturnDate().toString():null, "Expected Return Date", null,
				FacesContext.getCurrentInstance()) != null) {
			ASSET_VALID = false;
		}
		if((editAssetDetails.getRequiredDate()!=null) && (editAssetDetails.getExpectedReturnDate()!=null)){
			if(editAssetDetails.getRequiredDate().after(editAssetDetails.getExpectedReturnDate())) {
				ASSET_VALID = false;
				FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Required On date should be less than the return date.", ""));
			}
			if(date.after(editAssetDetails.getRequiredDate())) {
				ASSET_VALID = false;
				FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_WARN,"Required On date should be grater than the request date.", ""));
			}
		}
	  
	}
	//GENERATE SETTERS AND GETTERS
	public WAMUser getWamUser() {
		return wamUser;
	}

	public void setWamUser(WAMUser wamUser) {
		this.wamUser = wamUser;
	}

	public AssetRequestDAO getAssetRequestDAO() {
		return assetRequestDAO;
	}

	public void setAssetRequestDAO(AssetRequestDAO assetRequestDAO) {
		this.assetRequestDAO = assetRequestDAO;
	}

	public AssetRequest getAssetRequest() {
		return assetRequest;
	}

	public void setAssetRequest(AssetRequest assetRequest) {
		this.assetRequest = assetRequest;
	}

	public String getAssetCode() {
		return assetCode;
	}

	public void setAssetCode(String assetCode) {
		this.assetCode = assetCode;
	}

	public Employee getEmployeeVP() {
		return employeeVP;
	}

	public void setEmployeeVP(Employee employeeVP) {
		this.employeeVP = employeeVP;
	}

	public Map<String, String> getAssetsMap() {
		return assetsMap;
	}

	public void setAssetsMap(Map<String, String> assetsMap) {
		this.assetsMap = assetsMap;
	}

	public SystemAssets getSystemAssets() {
		return systemAssets;
	}

	public void setSystemAssets(SystemAssets systemAssets) {
		this.systemAssets = systemAssets;
	}

	
	public AssetDetails getAssetDetails() {
		return assetDetails;
	}

	public void setAssetDetails(AssetDetails assetDetails) {
		this.assetDetails = assetDetails;
	}

	public List<AssetDetails> getAssetDetailsList() {
		return assetDetailsList;
	}

	public void setAssetDetailsList(List<AssetDetails> assetDetailsList) {
		this.assetDetailsList = assetDetailsList;
	}

	public Map<String,String> getAssetPurposeMap() {
		return assetPurposeMap;
	}

	public void setAssetPurposeMap(Map<String,String> assetPurposeMap) {
		this.assetPurposeMap = assetPurposeMap;
	}

	public DataTable getAssetDetailsTable() {
		return assetDetailsTable;
	}

	public void setAssetDetailsTable(DataTable assetDetailsTable) {
		this.assetDetailsTable = assetDetailsTable;
	}
	
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public TimeZone getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(TimeZone timeZone) {
		this.timeZone = timeZone;
	}

	public List<AssetRequest> getViewAssetRequestList() {
		return viewAssetRequestList;
	}

	public void setViewAssetRequestList(List<AssetRequest> viewAssetRequestList) {
		this.viewAssetRequestList = viewAssetRequestList;
	}

	public AssetRequest getViewAssetRequest() {
		return viewAssetRequest;
	}

	public void setViewAssetRequest(AssetRequest viewAssetRequest) {
		this.viewAssetRequest = viewAssetRequest;
	}

	public List<AssetDetails> getViewAssetDetailsList() {
		return viewAssetDetailsList;
	}

	public void setViewAssetDetailsList(List<AssetDetails> viewAssetDetailsList) {
		this.viewAssetDetailsList = viewAssetDetailsList;
	}

	public AssetRequest getEditAssetRequest() {
		return editAssetRequest;
	}

	public void setEditAssetRequest(AssetRequest editAssetRequest) {
		this.editAssetRequest = editAssetRequest;
	}

	public List<AssetDetails> getEditAssetDetailsList() {
		return editAssetDetailsList;
	}

	public void setEditAssetDetailsList(List<AssetDetails> editAssetDetailsList) {
		this.editAssetDetailsList = editAssetDetailsList;
	}

	public AssetDetails getEditAssetDetails() {
		return editAssetDetails;
	}

	public void setEditAssetDetails(AssetDetails editAssetDetails) {
		this.editAssetDetails = editAssetDetails;
	}

	public DataTable getAssetDetailsEditTable() {
		return assetDetailsEditTable;
	}

	public void setAssetDetailsEditTable(DataTable assetDetailsEditTable) {
		this.assetDetailsEditTable = assetDetailsEditTable;
	}

}
